<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk">
  
  <!-- This is the start (home) page of the application. It just displays
  a message. Not very exciting... improvement is possible. -->
  <h:head>
    <title>IGNORED</title>
  </h:head>
  <h:body>
    <ui:composition template="/templates/stud_layout.xhtml">
      <ui:define name="content">
          <h2>#{strings.studplan_h1}</h2>
          <p>#{strings.studplan_p1}</p>
          <div id="content">
            </div>
            <h:column>
                <h:form>
                    <p>#{strings.plan_p2}</p>
                    <h:dataTable value="#{fileBean.files}" var="f">
                     <h:column>
                        <f:facet name="header">#{strings.filename}</f:facet>
                         <!-- this is a download link, note the use of the
                         ordinary html a tag, rather than the JSF h:link.
                         This is necessary because the link is to a servlet,
                         no to another facelet -->
                     <a href="download?id=#{f.id}">#{f.name}</a>
                    </h:column>
                    <h:column>
                    <f:facet name="header">#{strings.content}</f:facet>
                    #{f.contentType}
                    </h:column>
                    <h:column>
                    <f:facet name="header">#{strings.size}</f:facet>
                    #{f.fileSize}
                   </h:column>
                  </h:dataTable>
                </h:form>
            </h:column>
      </ui:define>
    </ui:composition>
  </h:body>
</html>